<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>The source code</title>
  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  <style type="text/css">
    .highlight { display: block; background-color: #ddd; }
  </style>
  <script type="text/javascript">
    function highlight() {
      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
    }
  </script>
</head>
<body onload="prettyPrint(); highlight();">
  <pre class="prettyprint lang-js"><span id='tostor'>/**
</span> * @class tostor
 * @param cc {object} 名字
 * @param ccc {object}
 * @author WebZhouT(243574263@qq.com)♂（￣▽￣）／
 * @type {array}
 * 返回数据类型
 */
function tostor() {
    var msg = arguments[0];//设置参数a的默认值为1
    var url = arguments[1] ? arguments[1] : &quot;&quot;;//设置参数a的默认值为1
    var type = arguments[2] ? arguments[2] : false;//设置参数a的默认值为1
    /*提示弹框样式定义在style.css内*/
    $(&quot;body&quot;).append(&quot;&lt;div class=&#39;bodymsg&#39;&gt;&lt;span&gt;&quot; + msg + &quot;&lt;/span&gt;&lt;/div&gt;&quot;);
    $(&quot;.bodymsg&quot;).stop(true,false).animate({&quot;bottom&quot;:&quot;15%&quot;}, function () {
        setTimeout(function () {
            $(&quot;.bodymsg&quot;).stop().animate({&quot;bottom&quot;:&quot;0px&quot;,&#39;opacity&#39;:&#39;0&#39;},300, function () {
                if (url == &quot;&quot;){
                    $(&quot;.bodymsg&quot;).remove();
                }else if(type){
                    window.location.replace(url);
                }else{
                    window.location.href = url;
                }
            });
        }, 2000);
    });
}
var userdata = new UserStorge();
<span id='UserStorge'>/**
</span> * @class UserStorge
 * @author WebZhouT
 * @param {string} uid
 * @param {string} 432
 */
function UserStorge(){
    var users = localStorage.getItem(&quot;user&quot;);
    if(users!= null){
<span id='mydata'>        /**
</span>         * @class mydata
         * @author WebZhouT
         * @param {string}  字段名称
        */
        this.mydata = function (txt) {
            var obj = JSON.parse(users);
            if(txt == &#39;uid&#39;){
                return obj.uid;
            }else if(txt == &#39;headimg&#39;){
                return obj.headimg;
            }else if(txt == &#39;phone&#39;){
                return obj.phone;
            }else if(txt == &#39;token&#39;){
                return obj.token;
            }else if(txt == &#39;uid&#39;){
                return obj.uid;
            }else if(txt == &#39;password&#39;){
                return obj.password;
            }else if(txt == &#39;key_token&#39;){
                return obj.key_token;
            }else if(txt == &#39;agent_id&#39;){
                return obj.agent_id;
            }else if(txt == &#39;link&#39;){
                return obj.link;
            }
        };
    }else{
        return users;
    }
}
<span id='GetQueryString'>/**
</span> * @class GetQueryString    地址栏
 */
/*地址栏*/
function GetQueryString(name)
{
    var reg = new RegExp(&quot;(^|&amp;)&quot;+ name +&quot;=([^&amp;]*)(&amp;|$)&quot;);
    var r = window.location.search.substr(1).match(reg);
    if(r!=null)return  unescape(r[2]); return null;
}</pre>
</body>
</html>
